package com.echo.register.commons.rabbitMQ;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @program: com.echo.voter
 * @description: MQ配置
 * @author: Xiaoti
 * @create: 2018-11-05 16:24
 **/
@Configuration
public class MQConfig {

    public static final String VOTE_QUEUE = "vote.queue";
    public static final String DETAIL_QUEUE = "detail.queue";
    public static final String RECORDS_QUEUE = "records.queue";

    /**
     * Direc模式 交换机
     * @return
     */
    @Bean
    public Queue queue1(){
        return new Queue(VOTE_QUEUE, true);
    }
    @Bean
    public Queue Queue2(){
        return new Queue(DETAIL_QUEUE, true);
    }
    @Bean
    public Queue Queue3() { return new Queue(RECORDS_QUEUE, true);}
}
